import { Controller, Get, Post, Body, Patch, Param, Delete, Query } from '@nestjs/common'
import { ProjService } from './proj.service'
import { CreateProjDto } from './dto/create-proj.dto'
import { UpdateProjDto } from './dto/update-proj.dto'

@Controller('proj')
export class ProjController {
  constructor(private readonly projService: ProjService) {}

  @Post()
  create(@Body() createProjDto: CreateProjDto) {
    return this.projService.create(createProjDto)
  }

  @Get()
  findAll(@Query() args = {}) {
    return this.projService.findAll(args)
  }

  @Get(':id')
  findOne(@Param('id') id: string) {
    return this.projService.findOne(+id)
  }

  @Patch(':id')
  update(@Param('id') id: string, @Body() updateProjDto: UpdateProjDto) {
    return this.projService.update(+id, updateProjDto)
  }

  @Delete(':id')
  remove(@Param('id') id: string) {
    return this.projService.remove(+id)
  }
}
